home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / vdl020d.zip / VDPMI.DOC < prev    next >
Text File  |  1993-04-14  |  22KB  |  642 lines

  1. {
  2. ════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix DOS Protected Mode Interface Unit (VDPMI)
  5.  Copyright 1991,92,93 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8. ────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  --------  --------  -------------------------------------------------------
  14.  
  15.  mep       04/01/93  Finish majority of unit model.
  16.  
  17.  jrt       01/09/92  Added RefBuffIntr function.  May move to other unit
  18.                      at a later date.
  19.  
  20.  jrt       12/15/92  Created.
  21.  
  22. ────────────────────────────────────────────────────────────────────────────
  23. }
  24.  
  25. Unit VDPMI;
  26.  
  27.  
  28. Uses
  29.  
  30.   DOS,
  31.   VTypes,
  32.   VGen;
  33.  
  34. {────────────────────────────────────────────────────────────────────────────}
  35.  
  36. {-----------------}
  37. { Error Constants }
  38. {-----------------}
  39.  
  40. Const
  41.  
  42.   dpmiNoErr  = 0;
  43.   dpmiGenErr = $CBAD;
  44.  
  45. Const
  46.  
  47. {-------------------------------------------------------}
  48. { Bitmaps for Function Variables                        }
  49. { - hexidecimals values are considered bitwise operants }
  50. {   and decimals are actual byte-values.                }
  51. {-------------------------------------------------------}
  52.  
  53.   { VDPMISimRealIntr.Flags,     }
  54.   { VDPMICallRealProc.Flags and }
  55.   { VDPMICallRealIntrProc       }
  56.   { - for DPMI 0.9 only.        }
  57.  
  58.    dpmibmResetIntrCtrlA20       = $1;
  59.  
  60.   { VDPMIGetVersion.Flags }
  61.  
  62.    dpmibmRunning32bit           = $1;
  63.    dpmibmProcessorRetRealMode   = $2;
  64.    dpmibmVirtMemSupport         = $4;
  65.    dpmibmRsvp1                  = $8;
  66.  
  67.   { VDPMIGetVersion.ProcType }
  68.  
  69.    dpmibm286                    = 2;
  70.    dpmibm386                    = 3;
  71.    dpmibm486                    = 4;
  72.  
  73.   { VDPMIGetCaps.CaoFlags }
  74.  
  75.    dpmibmPagedAccessSupport     = $1;
  76.    dpmibmPagedDirtySupport      = $1;
  77.    dpmibmExpRestartSupport      = $2;
  78.    dpmibmDevMapSupport          = $4;
  79.    dpmibmConvMemMapSupport      = $8;
  80.    dpmibmDemandZeroFilled       = $10;
  81.    dpmibmWriteProtClientCap     = $20;
  82.    dpmibmWriteProtHostCap       = $40;
  83.  
  84.  { VDPMIAllocLinMemory.Flags }
  85.  
  86.    dpmibmCreateCommitPages      = $1;
  87.  
  88.  { VDPMIResizeLinMemory.NewFlags -> see VDPMIAllocLinMemory.Flags }
  89.  
  90.    dpmibmSegDescUpdateReq       = $2;
  91.  
  92.  { VDPMIGetPageAttrs.PageAttr (each within PageAttrArr) }
  93.  
  94.    dpmibmPageType               = $1;  { 0..2 }
  95.    dpmibmPageReadWrite          = $4;  { 3 }
  96.    dpmibmAccessedBitsNext       = $8;  { 4 }
  97.    dpmibmPageAccessed           = $10; { 5 - see dpmibmAccessedBitsNext }
  98.    dpmibmPageWritten            = $20; { 6 - see dpmibmAccessedBitsNext }
  99.  
  100.  { VDPMITestDisableInts.PrevState and }
  101.  { VDPMITestEnableInts.PrevState      }
  102.  
  103.    dpmibmPrevDisabled           = 0;
  104.    dpmibmPrevEnabled            = 1;
  105.  
  106.  { VDPMITestInts.State }
  107.  
  108.    dpmibmNowDisabled            = 0;
  109.    dpmibmNowEnabled             = 1;
  110.  
  111.  { VDPMISetDebugWatchp.WatchType }
  112.  
  113.    dpmibmDebugExecute           = 0;
  114.    dpmibmDebugWrite             = 1;
  115.    dpmibmDebugReadWrite         = 2;
  116.  
  117.  { VDPMIGetDebugWatchpState.WatchState }
  118.  
  119.    dpmibmWatchpExecuted         = $1;
  120.  
  121.  { VDPMISerOneSharedMem.Flags }
  122.  
  123.    dpmibmSerRetWithoutSuspend   = $1;
  124.    dpmibmSerShared              = $2;
  125.  
  126.  { VDPMIFreeSerOnSharedMem.Flags }
  127.  
  128.    dpmibmReleaseSharedSer       = $1;
  129.    dpmibmFreePendingSer         = $2;
  130.  
  131.  { VDPMIGetCoprocStatus }
  132.  
  133.    dpmibmClientNumCoprocEnabled = $1;
  134.    dpmibmClientIsEmuCoproc      = $2;
  135.    dpmibmNumCoprocPresent       = $4;
  136.    dpmibmHostEmuCoprocInst      = $8;
  137.    dpmibmCoprocType             = $10; { 4..7 }
  138.  
  139.    dpmibmCoprocNone             = 0;
  140.    dpmibmCoproc80287            = 1;
  141.    dpmibmCoproc80387            = 2;
  142.    dpmibmCoproc80486            = 3;
  143.  
  144.  { VDPMISetCoProcEmulation.EmuFlags }
  145.  
  146.    dpmibmEnableClientNumCoproc  = $1;
  147.    dpmibmClientWillEmuCoproc    = $2;
  148.  
  149. {---------------------------}
  150. { Constants for RefBuffIntr }
  151. {---------------------------}
  152.  
  153. Const
  154.  
  155.   rb_ESAX    = $0001;
  156.   rb_ESBX    = $0002;
  157.   rb_ESCX    = $0003;
  158.   rb_ESDX    = $0004;
  159.   rb_ESSI    = $0005;
  160.   rb_ESDI    = $0006;
  161.   rb_ESBP    = $0007;
  162.  
  163.   rb_DSAX    = $0011;
  164.   rb_DSBX    = $0012;
  165.   rb_DSCX    = $0013;
  166.   rb_DSDX    = $0014;
  167.   rb_DSSI    = $0015;
  168.   rb_DSDI    = $0016;
  169.   rb_DSBP    = $0017;
  170.  
  171.   rb_down    = $0100;
  172.   rb_up      = $0200;
  173.   rb_updown  = $0300;
  174.   rb_downup  = $0300;
  175.  
  176.  
  177. {-----------------------------------}
  178. { DPMI Real mode register structure }
  179. {-----------------------------------}
  180.  
  181. Type
  182.  
  183.   QWORD      = Array[1..2] of LONGINT;
  184.  
  185.   TREGISTERS = REGISTERS;
  186.  
  187.   TDPMIErr   = WORD;
  188.  
  189.   {---------------------------------}
  190.  
  191.   TDPMIRealRegs = RECORD
  192.  
  193.     EDI    : LONGINT;
  194.     ESI    : LONGINT;
  195.     EBP    : LONGINT;
  196.     Resp1  : LONGINT;
  197.     EBX    : LONGINT;
  198.     EDX    : LONGINT;
  199.     ECX    : LONGINT;
  200.     EAX    : LONGINT;
  201.     Flags  : WORD;
  202.     ES     : WORD;
  203.     DS     : WORD;
  204.     FS     : WORD;
  205.     GS     : WORD;
  206.     IP     : WORD;
  207.     CS     : WORD;
  208.     SP     : WORD;
  209.     SS     : WORD;
  210.  
  211.   END;
  212.   PDPMIRealRegs = ^TDPMIRealRegs;
  213.  
  214.   {---------------------------------}
  215.  
  216.   TDescriptorT = RECORD
  217.  
  218.     DescLimit      : WORD;
  219.     DescLinBaseLo  : WORD;
  220.     DescLinBaseMid : BYTE;
  221.     DescAccess     : BYTE;
  222.     DescExtAccess  : BYTE;
  223.     DescLinBaseHi  : BYTE;
  224.  
  225.   END;
  226.  
  227.   PDescriptorT = ^TDescriptorT;
  228.  
  229.   {---------------------------------}
  230.  
  231.   PVectHandle = POINTER; { Selector:Offset }
  232.  
  233.   PSelOfs = POINTER; { Selector:Offset }
  234.  
  235.   PSelOfs32 = Array[1..6] of BYTE; { Selector:Offset-32BIT }
  236.  
  237.   {---------------------------------}
  238.  
  239.   TDescBuff = RECORD
  240.  
  241.     Selector   : WORD;
  242.     Descriptor : QWORD;
  243.  
  244.   END;
  245.   PDescBuff = ^TDescBuff;
  246.  
  247.   {---------------------------------}
  248.  
  249.   TStackFrame16 = RECORD
  250.  
  251.     RetCSIP    : LONGINT;
  252.     ErrorCode  : WORD;
  253.     ExceptCSIP : LONGINT;
  254.     Flags      : WORD;
  255.     SSSP       : LONGINT;
  256.  
  257.   END;
  258.   PStackFrame16 = ^TStackFrame16;
  259.  
  260.   {---------------------------------}
  261.  
  262.   TStackFrame32 = RECORD
  263.  
  264.     RetEIP      : LONGINT;
  265.     RetCSSel    : WORD;
  266.     Rsvp1       : WORD;
  267.     ErrorCode   : LONGINT;
  268.     ExceptEIP   : LONGINT;
  269.     ExceptCSSel : WORD;
  270.     Rsvp2       : WORD;
  271.     EFlags      : LONGINT;
  272.     ESP         : LONGINT;
  273.     SS          : WORD;
  274.     Rsvp3       : WORD;
  275.  
  276.   END;
  277.  
  278.   PStackFrame32 = ^TStackFrame32;
  279.  
  280.   {---------------------------------}
  281.  
  282.   TGetCapsBuff = RECORD
  283.  
  284.     MajorVer : BYTE;
  285.     MinorVer : BYTE;
  286.     Vendor   : Array[1..126] of CHAR;
  287.  
  288.   END;
  289.   PGetCapsBuff = ^TGetCapsBuff;
  290.  
  291.   {---------------------------------}
  292.  
  293.   TFreeMemInfo = RECORD
  294.  
  295.     MaxAvailBlock      : LONGINT;
  296.     MaxUnlockPageAlloc : LONGINT;
  297.     MaxLockPageAlloc   : LONGINT;
  298.     TotalLinAddrPages  : LONGINT;
  299.     TotalUnlockPages   : LONGINT;
  300.     FreePages          : LONGINT;
  301.     TotalPhyPages      : LONGINT;
  302.     FreeLinAddrPages   : LONGINT;
  303.     SizePageFile       : LONGINT;
  304.     Rsvp               : Array[1..12] of BYTE;
  305.  
  306.   END;
  307.   PFreeMemInfo = ^TFreeMemInfo;
  308.  
  309.   {---------------------------------}
  310.  
  311.   TPageAttr = Array[1..1] of WORD;
  312.   PPageAttr = ^PPageAttr;
  313.  
  314.   {---------------------------------}
  315.  
  316.   TMemInfo = RECORD
  317.  
  318.     HostPhyMemAlloc    : LONGINT;
  319.     HostVirtMemAlloc   : LONGINT;
  320.     HostVirtMemAvail   : LONGINT;
  321.     CurrVirtMemAlloc   : LONGINT;
  322.     CurrVirtMemAvail   : LONGINT;
  323.     ClientVirtMemAlloc : LONGINT;
  324.     ClientVirtMemAvail : LONGINT;
  325.     ClientMemLocked    : LONGINT;
  326.     ClientMaxMemLocked : LONGINT;
  327.     ClientMaxLinAddr   : LONGINT;
  328.     MaxBlockAvail      : LONGINT;
  329.     MinAllocUnit       : LONGINT;
  330.     AlignAllocUnit     : LONGINT;
  331.     Rsvp               : Array[1..76] of BYTE;
  332.  
  333.   END;
  334.   PMemInfo = ^TMemInfo;
  335.  
  336.   {---------------------------------}
  337.  
  338.   TRSPBuff = RECORD
  339.  
  340.     Desc16DataSeg     : QWORD;
  341.     Desc16CodeSeg     : QWORD;
  342.     Ofs16CallbackProc : WORD;
  343.     Rsvp              : Array[1..2] of BYTE;
  344.     Desc32DataSeg     : QWORD;
  345.     Desc32CodeSeg     : QWORD;
  346.     Ofs32CallbackProc : LONGINT;
  347.  
  348.   END;
  349.   PRSPBuff = ^TRSPBuff;
  350.  
  351.   {---------------------------------}
  352.  
  353.   TMemReqStruct = RECORD
  354.  
  355.     ReqMemBlockSize : LONGINT;
  356.     AllocBlockSize  : LONGINT;
  357.     SMemHandle      : LONGINT;
  358.     LinAddr         : LONGINT;
  359.     MemBlockName    : PSelOfs32;
  360.     Rsvp1           : Array[1..2] of BYTE;
  361.     Rsvp2           : Array[1..4] of BYTE;
  362.  
  363.   END;
  364.   PMemReqStruct = ^TMemReqStruct;
  365.  
  366.   {---------------------------------}
  367.  
  368. {────────────────────────────────────────────────────────────────────────────}
  369.  
  370. { see DPMI 0.9 spec for info on these functions }
  371. { can be used in any environment that is a DPMI }
  372. { server (BP 7.0 protected mode, windows dos    }
  373. { boxes, OS/2 dos boxes, etc.                   }
  374.  
  375.  
  376. Function  VDPMIErrToStr(               ErrCode        : WORD    ) : STRING;
  377.  
  378. Function  VDPMIInstalled                                          : BOOLEAN;
  379.  
  380. Function  VDPMIInstallInfo(        Var Support32bit   : BOOLEAN;
  381.                                    Var Processor      : BYTE;
  382.                                    Var MajorVer       : BYTE;
  383.                                    Var MinorVer       : BYTE;
  384.                                    Var NumParagraphs  : WORD;
  385.                                    Var DPMIEntry      : POINTER ) : TDPMIErr;
  386.  
  387. Function  VDPMIAllocLDTDescriptor(     NumDesc        : WORD;
  388.                                    Var BaseSelector   : WORD    ) : TDPMIErr;
  389.  
  390. Function  VDPMIFreeLDTDescriptor(      Selector       : WORD    ) : TDPMIErr;
  391.  
  392. Function  VDPMIMapSegToSel(            RealModeSeg    : WORD;
  393.                                    Var NewSelector    : WORD    ) : TDPMIErr;
  394.  
  395. Function  VDPMIGetSelectorDiff                                    : TDPMIErr;
  396.  
  397. Function  VDPMILockSel(                Selector       : WORD    ) : TDPMIErr;
  398.  
  399. Function  VDPMIUnlockSel(              Selector       : WORD    ) : TDPMIErr;
  400.  
  401. Function  VDPMIGetSegmentBase(         Selector       : WORD;
  402.                                    Var BaseAddr       : LONGINT ) : TDPMIErr;
  403.  
  404. Function  VDPMISetSegmentBase(         Selector       : WORD;
  405.                                        BaseAddr       : LONGINT ) : TDPMIErr;
  406.  
  407. Function  VDPMISetSegmentLimit(        Selector       : WORD;
  408.                                        Limit          : LONGINT ) : TDPMIErr;
  409.  
  410. Function  VDPMISetSegmentRights(       Selector       : WORD;
  411.                                        Rights         : BYTE;
  412.                                        ExtRights      : BYTE    ) : TDPMIErr;
  413.  
  414. Function  VDPMICreateAlias(            Selector       : WORD;
  415.                                    Var NewSelector    : WORD    ) : TDPMIErr;
  416.  
  417. Function  VDPMIGetDescriptor(          Selector       : WORD;
  418.                                        DescBuff       : POINTER ) : TDPMIErr;
  419.  
  420. Function  VDPMISetDescriptor(          Selector       : WORD;
  421.                                        DescBuff       : POINTER ) : TDPMIErr;
  422.  
  423. Function  VDPMIAllocSpecDescriptor(    Selector       : WORD    ) : TDPMIErr;
  424.  
  425. Function  VDPMIGetMultDescriptors(     NumDescs       : WORD;
  426.                                        DescBuff       : PDescBuff;
  427.                                    Var NumDescsCopied : WORD    ) : TDPMIErr;
  428.  
  429. Function  VDPMISetMultDescriptors(     NumDescs       : WORD;
  430.                                        DescBuff       : PDescBuff;
  431.                                    Var NumDescsCopied : WORD    ) : TDPMIErr;
  432.  
  433. Function  VDPMIAllocDOSMemory(         NumParas       : WORD;
  434.                                    Var RealModeSeg    : WORD;
  435.                                    Var ProtModeSel    : WORD    ) : TDPMIErr;
  436.  
  437. Function  VDPMIFreeDOSMemory(          ProtModeSel    : WORD    ) : TDPMIErr;
  438.  
  439. Function  VDPMIResizeDOSMemory(        Selector       : WORD;
  440.                                        NewBlockParas  : WORD;
  441.                                    Var MaxBlockSize   : WORD    ) : TDPMIErr;
  442.  
  443. Function  VDPMIGetRealIntrVector(      IntNum         : WORD;
  444.                                    Var Vector         : POINTER ) : TDPMIErr;
  445.  
  446. Function  VDPMISetRealIntrVector(      IntNum         : WORD;
  447.                                        Vector         : POINTER ) : TDPMIErr;
  448.  
  449. Function  VDPMIGetProcExpVector(       ExpNum         : BYTE;
  450.                                    Var Vector         : PVectHandle ) : TDPMIErr;
  451.  
  452. Function  VDPMISetProcExpVector(       ExpNum         : BYTE;
  453.                                        Vector         : PVectHandle ) : TDPMIErr;
  454.  
  455. Function  VDPMIGetProtIntrVector(      IntNum         : WORD;
  456.                                    Var Vector         : PVectHandle ) : TDPMIErr;
  457.  
  458. Function  VDPMISetProtIntrVector(      IntNum         : WORD;
  459.                                        Vector         : PVectHandle ) : TDPMIErr;
  460.  
  461. Function  VDPMIGetProtExtExpProc(      ExpNum         : BYTE;
  462.                                    Var Handler        : PVectHandle ) : TDPMIErr;
  463.  
  464. Function  VDPMIGetRealExtExpProc(      ExpNum         : BYTE;
  465.                                    Var Handler        : PVectHandle ) : TDPMIErr;
  466.  
  467. Function  VDPMISetProtExtExpProc(      ExpFaultNum    : BYTE;
  468.                                    Var Handler        : PVectHandle ) : TDPMIErr;
  469.  
  470. Function  VDPMISetRealExtExpProc(      ExpFaultNum    : BYTE;
  471.                                    Var Handler        : PVectHandle ) : TDPMIErr;
  472.  
  473. Function  VDPMISimRealIntr(            IntrNum        : WORD;
  474.                                        Flags          : WORD;
  475.                                        StackCopy      : WORD;
  476.                                        RealRegs       : PDPMIRealRegs) : TDPMIErr;
  477.  
  478. Function  VDPMICallRealProc(           Flags          : WORD;
  479.                                        StackCopy      : WORD;
  480.                                        RealRegs       : PDPMIRealRegs) : TDPMIErr;
  481.  
  482. Function  VDPMICallRealIntrProc(       Flags          : WORD;
  483.                                        StackCopy      : WORD;
  484.                                        RealRegs       : PDPMIRealRegs) : TDPMIErr;
  485.  
  486. Function  VDPMIAllocRealCallback(      ProtProc       : PSelOfs;
  487.                                        RealRegBuff    : PDPMIRealRegs;
  488.                                    Var CallBackAddr   : POINTER ) : TDPMIErr;
  489.  
  490. Function  VDPMIFreeRealCallback(       CallBackAddr   : POINTER ) : TDPMIErr;
  491.  
  492. Function  VDPMIGetStateSRProcs(    Var StateBuffSize  : WORD;
  493.                                    Var RealModeAddr   : POINTER;
  494.                                    Var ProtModeAddr   : POINTER ) : TDPMIErr;
  495.  
  496. Function  VDPMIGetRawSwitchProcs(  Var RealToProtAddr : POINTER;
  497.                                    Var ProtToRealAddr : POINTER ) : TDPMIErr;
  498.  
  499. Function  VDPMIGetVersion(         Var MajorVer       : BYTE;
  500.                                    Var MinorVer       : BYTE;
  501.                                    Var Flags          : WORD;
  502.                                    Var ProcType       : BYTE;
  503.                                    Var VirtMastPIC    : BYTE;
  504.                                    Var VirtSlavePIC   : BYTE    ) : TDPMIErr;
  505.  
  506. Function  VDPMIGetCaps(                InfoBuffer     : PGetCapsBuff;
  507.                                    Var CaoFlags       : WORD    ) : TDPMIErr;
  508.  
  509. Function  VDPMIGetFreeMemory(          InfoBuffer     : PFreeMemInfo ) : TDPMIErr;
  510.  
  511. Function  VDPMIAllocMemory(            Size           : LONGINT;
  512.                                    Var LinAddr        : LONGINT;
  513.                                    Var MemHandle      : LONGINT ) : TDPMIErr;
  514.  
  515. Function  VDPMIFreeMemory(             MemHandle      : LONGINT ) : TDPMIErr;
  516.  
  517. Function  VDPMIResizeMemory(           MemHandle      : LONGINT;
  518.                                        NewSize        : LONGINT;
  519.                                    Var NewMemHandle   : LONGINT;
  520.                                    Var NewLinAddr     : LONGINT ) : TDPMIErr;
  521.  
  522. Function  VDPMIAllocLinMemory(         LinAddr        : LONGINT;
  523.                                        Size           : LONGINT;
  524.                                        Flags          : LONGINT;
  525.                                    Var NewLinAddr     : LONGINT;
  526.                                    Var MemHandle      : LONGINT ) : TDPMIErr;
  527.  
  528. Function  VDPMIResizeLinMemory(        MemHandle      : LONGINT;
  529.                                        NewSize        : LONGINT;
  530.                                        NewFlags       : LONGINT;
  531.                                    Var NewLinAddr     : LONGINT;
  532.                                    Var NewMemHandle   : LONGINT ) : TDPMIErr;
  533.  
  534. Function  VDPMIGetPageAttrs(           MemHandle      : LONGINT;
  535.                                        BasePageOfs    : LONGINT;
  536.                                        NumPages       : LONGINT;
  537.                                    Var PageAttrArr    : PPageAttr ) : TDPMIErr;
  538.  
  539. Function  VDPMIModifyPageAttrs(        MemHandle      : LONGINT;
  540.                                        BasePageOfs    : LONGINT;
  541.                                        NumPages       : LONGINT;
  542.                                        PageAttrArr    : PPageAttr;
  543.                                    Var NewNumPages    : LONGINT ) : TDPMIErr;
  544.  
  545. Function  VDPMIMapDeviceMemory(        MemHandle      : LONGINT;
  546.                                        PageOfs        : LONGINT;
  547.                                        NumPages       : LONGINT;
  548.                                        PhyDevAddr     : LONGINT ) : TDPMIErr;
  549.  
  550. Function  VDPMIMapConvMemory(          MemHandle      : LONGINT;
  551.                                        PageOfs        : LONGINT;
  552.                                        NumPages       : LONGINT;
  553.                                        LinConvMemAddr : LONGINT ) : TDPMIErr;
  554.  
  555. Function  VDPMIGetMemorySizeBase(      MemHandle      : LONGINT;
  556.                                    Var Size           : LONGINT;
  557.                                    Var BaseAddr       : POINTER ) : TDPMIErr;
  558.  
  559. Function  VDPMIGetMemoryInfo(          MemInfo        : PMemInfo) : TDPMIErr;
  560.  
  561. Function  VDPMILockLinRegion(          LinearStart    : LONGINT;
  562.                                        Size           : LONGINT ) : TDPMIErr;
  563.  
  564. Function  VDPMIUnlockLinRegion(        LinearStart    : LONGINT;
  565.                                        Size           : LONGINT ) : TDPMIErr;
  566.  
  567. Function  VDPMIMarkRealRegionPageable( LinearStart    : LONGINT;
  568.                                        Size           : LONGINT ) : TDPMIErr;
  569.  
  570. Function  VDPMIRelockRealRegion(       LinearStart    : LONGINT;
  571.                                        Size           : LONGINT ) : TDPMIErr;
  572.  
  573. Function  VDPMIGetPageSize(        Var PageSize       : LONGINT ) : TDPMIErr;
  574.  
  575. Function  VDPMIMarkPagesCandidate(     LinearStart    : LONGINT;
  576.                                        Size           : LONGINT ) : TDPMIErr;
  577.  
  578. Function  VDPMIDiscardPages(           LinearStart    : LONGINT;
  579.                                        Size           : LONGINT ) : TDPMIErr;
  580.  
  581. Function  VDPMINominatePages(          LinearStart    : LONGINT;
  582.                                        Size           : LONGINT ) : TDPMIErr;
  583.  
  584. Function  VDPMIDiscardPageContents(    LinearStart    : LONGINT;
  585.                                        Size           : LONGINT ) : TDPMIErr;
  586.  
  587. Function  VDPMIMapPhysicalRegion(      PhysStart      : LONGINT;
  588.                                        Size           : LONGINT;
  589.                                    Var LinAddr        : LONGINT ) : TDPMIErr;
  590.  
  591. Function  VDPMIFreePhysicalRegion(     LinAddr        : LONGINT ) : TDPMIErr;
  592.  
  593. Function  VDPMITestDisableInts(    Var PrevState      : BYTE    ) : TDPMIErr;
  594.  
  595. Function  VDPMITestEnableInts(     Var PrevState      : BYTE    ) : TDPMIErr;
  596.  
  597. Function  VDPMITestInts(           Var State          : BYTE    ) : TDPMIErr;
  598.  
  599. Function  VDPMIGetVendorAPIEntry(      VendorName     : STRING;
  600.                                    Var APIEntry       : POINTER ) : TDPMIErr;
  601.  
  602. Function  VDPMISetDebugWatchp(         LinAddr        : LONGINT;
  603.                                        WatchSize      : BYTE;
  604.                                        WatchType      : BYTE;
  605.                                    Var WatchHandle    : WORD    ) : TDPMIErr;
  606.  
  607. Function  VDPMIClearDebugWatchp(       WatchHandle    : WORD    ) : TDPMIErr;
  608.  
  609.  
  610. Function  VDPMIGetDebugWatchpState(    WatchHandle    : WORD;
  611.                                    Var WatchState     : WORD    ) : TDPMIErr;
  612.  
  613. Function  VDPMIResetDebugWatchp(       WatchHandle    : WORD    ) : TDPMIErr;
  614.  
  615. Function  VDPMIInstallRSPCallback(     RSPBuff        : PRSPBuff) : TDPMIErr;
  616.  
  617. Function  VDPMITermAndStayResident(    RetCode        : BYTE;
  618.                                        DosParasToKeep : WORD    ) : TDPMIErr;
  619.  
  620. Function  VDPMIAllocSharedMemory(      MemReqStruct   : PMemReqStruct ) : TDPMIErr;
  621.  
  622. Function  VDPMIFreeSharedMemory(       SMemHandle     : LONGINT ) : TDPMIErr;
  623.  
  624. Function  VDPMISerOnSharedMem(         SMemHandle     : LONGINT;
  625.                                        Flags          : WORD    ) : TDPMIErr;
  626.  
  627. Function  VDPMIFreeSerOnSharedMem(     SMemHandle     : LONGINT;
  628.                                        Flags          : WORD    ) : TDPMIErr;
  629.  
  630. Function  VDPMIGetCoprocStatus                                    : WORD;
  631.  
  632. Function  VDPMISetCoProcEmulation(     EmuFlags       : WORD    ) : TDPMIErr;
  633.  
  634. Function  RefBuffIntr(                 Flags          : WORD;
  635.                                        IntNum         : BYTE;
  636.                                        R              : TREGISTERS;
  637.                                        BuffPtr        : POINTER;
  638.                                        BuffSize       : LONGINT ) : TDPMIErr;
  639.  
  640. {────────────────────────────────────────────────────────────────────────────}
  641.  
  642.